<?php
namespace app\admin\validate\Speech;
use yzh52521\validate\Validate;

class TypeTtsValidate extends validate{

	/**
	 *@description 验证器规则
	 *@buildcode(true)
	*/
	protected $rule = [
		'type'=>['require'],
		'appkey'=>['require','unique:typetts'],
		'url'=>['require'],
		'name'=>['require'],
	];

	/**
	 *@description 错误提示
	 *@buildcode(true)
	*/
	protected $message = [
		'type.require'=>'类型不能为空',
		'appkey.require'=>'appkey不能为空',
		'appkey.unique'=>'appkey已经存在',
		'url.require'=>'url不能为空',
		'name.require'=>'name不能为空',
	];

	/**
	 *@description 验证场景
	 *@buildcode(true)
	*/
	protected $scene  = [
		'add'=>['type','appkey','url','name'],
		'update'=>['type','appkey','url','name'],
	];



}